import Mock from 'mockjs'

const RechargeTop10List = [];

for (let i = 0; i < 10; i++) {
  RechargeTop10List.push(Mock.mock({
    'id|1': '@increment',
    username: '@first',
    'count|1-10000000': 10000000,
    'totalMoney|1-10000000': 10000000,
  }))
}

const WithdrawTop10List = [];

for (let i = 0; i < 10; i++) {
  WithdrawTop10List.push(Mock.mock({
    'id|1': '@increment',
    username: '@first',
    'count|1-10000000': 10000000,
    'totalMoney|1-10000000': 10000000,
  }))
}

const profitTop10List = [];

for (let i = 0; i < 10; i++) {
  profitTop10List.push(Mock.mock({
    'id|1': '@increment',
    username: '@first',
    'count|1-10000000': 10000000,
    'totalMoney|1-10000000': 10000000,
  }))
}

const LossTop10List = [];

for (let i = 0; i < 10; i++) {
  LossTop10List.push(Mock.mock({
    'id|1': '@increment',
    username: '@first',
    'count|1-10000000': 10000000,
    'totalMoney|1-10000000': 10000000,
  }))
}

const BettingData = [];

const BettingDateData = [];
let time = moment(1530389246678);

for (let i = 0; i < 300; i++) {
  time = time.add(1, 'h');

  BettingDateData.push(time.format('YYYY-MM-DD H:mm:ss'));

  BettingData.push(Mock.mock([
    {
      title: 'AG捕鱼',
      'value|1-100000': 100000,
    },
    {
      title: 'AG真人',
      'value|1-100000': 100000,
    },
    {
      title: '贝博体育',
      'value|1-100000': 100000,
    },
    {
      title: 'YB彩票',
      'value|1-100000': 100000,
    },
    {
      title: 'PT电子',
      'value|1-100000': 100000,
    },
  ]))
}

export default {
  [api.DASHBOARD_REAL_TIME_DATA]: () => ({
    code: 1,
    data: Mock.mock({
      'newRegisterCount|1-10000': 10000,
      'totalRechargeMoney|1-1000000000': 100000,
      'totalRechargePeople|1-1000': 1000,
      'totalWithdrawMoney|1-1000000000': 1000000,
      'totalWithdrawPeople|1-1000': 1000,
      'totalDividendMoney|1-1000000000': 1000000,
      'totalDividendPeople|1-1000': 1000,
      'onlineUsers|1-1000': 1000,
      'statisticMoney|1-100000000': 1000,
    }),
  }),
  [api.DASHBOARD_RECHARGE_TOP10]: () => ({
    code: 1,
    data: {
      items: RechargeTop10List
    },
  }),

  [api.DASHBOARD_WITHDRAW_TOP10]: () => ({
    code: 1,
    data: {
      items: WithdrawTop10List
    },
  }),

  [api.DASHBOARD_PROFIT_TOP10]: () => ({
    code: 1,
    data: {
      items: profitTop10List
    },
  }),
  [api.DASHBOARD_LOSS_TOP10]: () => ({
    code: 1,
    data: {
      items: LossTop10List
    },
  }),
  [api.DASHBOARD_MONTHLY_DATA]: () => ({
    code: 1,
    data: Mock.mock({
      'newRegisterCount|1-10000': 10000,
      'totalRechargeMoney|1-1000000000': 1000000,
      'totalRechargePeople|1-1000': 1000,
      'totalWithdrawMoney|1-1000000000': 1000000,
      'totalWithdrawPeople|1-1000': 1000,
      'totalDividendMoney|1-1000000000': 1000000,
    }),
  }),

  [api.DASHBOARD_BETTING_DATA]: () => ({
    code: 1,
    data: {
      date: BettingDateData,
      data: BettingData,
    },
  }),

  [api.DASHBOARD_PROFIT_DATA]: () => ({
    code: 1,
    data: Mock.mock([
      {
        id: consts.AG_FISH,
        title: 'AG捕鱼',
        'value|1-100000': 100000,
      },
      {
        id: consts.AG_REAL,
        title: 'AG真人',
        'value|1-100000': 100000,
      },
      {
        id: consts.SPORTS_118,
        title: '贝博体育',
        'value|1-100000': 100000,
      },
      {
        id: consts.PT,
        title: 'YB彩票',
        'value|-1--100000': 100000,
      },
      {
        id: consts.PT,
        title: 'PT电子',
        'value|1-100000': 100000,
      },
    ])
  }),
}
